
package ipad.asia.dao;

import ipad.asia.entity.PunishConsumer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PunishConsumerDao extends JpaRepository<PunishConsumer,Long> {
    List<PunishConsumer> findAll();
    PunishConsumer findById(int id);
    List<PunishConsumer> findByConsumerId(int consumerId);
    @Modifying
    @Query("update PunishConsumer set statues=?1,serious=?2,result=?3 where id=?4")
    void update(int statues,int serious,String result,int id);
}

